<{include file="header.tpl"}>
<style>
   li { line-height:28px; border-bottom:1px dashed #ccc; }
</style>

<form name="form1" action="?ct=users&ac=edit_purview_groups&even=saveedit" method="POST" enctype="multipart/form-data">
    <div class="comBox">
        <div class="comHeader">
            组权限管理 -- <{$group_name}>
        </div>
        <div class="comTable bt">

            <div style="padding:15px;">
                <{if empty($even)}>
                <ul>
                    <li>
                        <span class="label">管理员组：</span>
                        <span style='color:#666'>
                            <a href='?ct=users&ac=index&gp=admin_admin'>成员列表</a> &nbsp; | &nbsp; 
                            开放所有权限
                        </span>
                    </li>
                    <{foreach from=$access_groups.pools.admin.private key=k item=v}>
                    <{if $k != 'admin' }>
                    <li>
                        <span class="label"><{$v.name}>：</span>
                        <span>
                            <a href='?ct=users&ac=index&gp=<{$k}>'>成员列表</a> &nbsp; | &nbsp; 
                            <a href='?ct=users&ac=edit_purview_groups&even=edit&group=admin_<{$k}>&pools=admin'>修改组权限</a>
                        </span>
                    </li>
                    <{/if}>
                    <{/foreach}>
                </ul>
                <{else}>
                <{foreach from=$config_apps key=k item=v}>
                <div style='padding-left:10px;'>
                    <div class='title' style='line-height:28px;border-bottom:1px dashed #ccc;font-weight:bold;'>
                        <label><input type='checkbox' name='groups[]' value='<{$k}>-*'<{if (!empty($groups.allow) && $groups.allow=='*') || (!empty($groups.allow.$k) && in_array('*', $groups.allow.$k)) }> checked='checked'<{/if}> />
                            <{$v.app_name}></label>
                    </div>
                    <div style='line-height:28px;width:90%;padding-top:10px;'>
                        <{foreach from=$v key=kk item=vv name=foo}>
                        <{if $kk != 'app_name'  }>
                        <{if $smarty.foreach.foo.index > 1 and $smarty.foreach.foo.index-1 mod 4 eq 0}><br /><{/if}>
                        <span style="display:-moz-inline-box; display:inline-block; width:200px;">
                            <label><input type='checkbox' name='groups[]' value='<{$k}>-<{$kk}>'<{if !empty($groups.allow.$k) && in_array($kk, $groups.allow.$k) }> checked='checked'<{/if}><{if  !empty($groups.allow.$k) && in_array('*', $groups.allow.$k)}>disabled="disabled"<{/if}>/> <{$vv}></label>
                        </span>
                        <{/if}>
                        <{/foreach}>
                    </div>
                </div>
                <br />
                <{/foreach}>
                <div class="submit">
                    <input type='hidden' name='group' value='<{$request.group}>' />
                </div>
                <{/if}>
                <div style="margin-top:15px">
                    <{if $even == 'edit'}>
                    <button  type="submit" class="sub">确定保存</button>&nbsp;<{/if}>
                    <a   href="index.php?ct=users&ac=add_purview_groups" class="sub">增加用户组</a>
                </div>
            </div><!--<div style="padding:15px;">-->


        </div><!--comTable-->
    </div><!--comBox-->
</form>
<{include file="footer.tpl"}>


